/**
 * Copyright 2025 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

:host {
    --spectrum-accordion-item-height: var(--spectrum-component-height-200);
    --spectrum-accordion-item-width: var(--spectrum-accordion-minimum-width);
    --spectrum-accordion-disclosure-indicator-height: var(--spectrum-component-height-100);
    --spectrum-accordion-disclosure-indicator-to-text-space: var(--spectrum-accordion-disclosure-indicator-to-text);
    --spectrum-accordion-edge-to-disclosure-indicator-space: var(--spectrum-accordion-edge-to-disclosure-indicator);
    --spectrum-accordion-edge-to-text-space: var(--spectrum-accordion-edge-to-text);
    --spectrum-accordion-item-header-top-to-text-space: var(--spectrum-accordion-top-to-text-regular-medium);
    --spectrum-accordion-item-header-bottom-to-text-space: var(--spectrum-accordion-bottom-to-text-regular-medium);
    --spectrum-accordion-focus-indicator-gap: var(--spectrum-focus-indicator-gap);
    --spectrum-accordion-focus-indicator-thickness: var(--spectrum-focus-indicator-thickness);
    --spectrum-accordion-corner-radius: var(--spectrum-corner-radius-100);
    --spectrum-accordion-item-content-area-top-to-content: var(--spectrum-accordion-content-area-top-to-content);
    --spectrum-accordion-item-content-area-bottom-to-content: var(--spectrum-accordion-content-area-bottom-to-content);
    --spectrum-accordion-component-edge-to-text: var(--spectrum-component-edge-to-text-75);
    --spectrum-accordion-item-header-font: var(--spectrum-sans-font-family-stack);
    --spectrum-accordion-item-header-font-weight: var(--spectrum-bold-font-weight);
    --spectrum-accordion-item-header-font-style: var(--spectrum-default-font-style);
    --spectrum-accordion-item-header-font-size: var(--spectrum-font-size-300);
    --spectrum-accordion-item-header-line-height: 1.25;
    --spectrum-accordion-item-content-font: var(--spectrum-sans-font-family-stack);
    --spectrum-accordion-item-content-font-weight: var(--spectrum-body-sans-serif-font-weight);
    --spectrum-accordion-item-content-font-style: var(--spectrum-body-sans-serif-font-style);
    --spectrum-accordion-item-content-font-size: var(--spectrum-body-size-s);
    --spectrum-accordion-item-content-line-height: var(--spectrum-line-height-100);
    --spectrum-accordion-background-color-default: rgba(var(--spectrum-gray-900-rgb), var(--spectrum-background-opacity-default));
    --spectrum-accordion-background-color-hover: rgba(var(--spectrum-gray-900-rgb), var(--spectrum-background-opacity-hover));
    --spectrum-accordion-background-color-down: rgba(var(--spectrum-gray-900-rgb), var(--spectrum-background-opacity-down));
    --spectrum-accordion-background-color-key-focus: rgba(var(--spectrum-gray-900-rgb), var(--spectrum-background-opacity-key-focus));
    --spectrum-accordion-item-header-color-default: var(--spectrum-neutral-content-color-default);
    --spectrum-accordion-item-header-color-hover: var(--spectrum-neutral-content-color-hover);
    --spectrum-accordion-item-header-color-down: var(--spectrum-neutral-content-color-down);
    --spectrum-accordion-item-header-color-key-focus: var(--spectrum-neutral-content-color-key-focus);
    --spectrum-accordion-item-header-disabled-color: var(--spectrum-disabled-content-color);
    --spectrum-accordion-focus-indicator-color: var(--spectrum-focus-indicator-color);
    --spectrum-accordion-min-block-size: max(
        var(--mod-accordion-item-height, var(--spectrum-accordion-item-height)),
        calc(var(--mod-accordion-item-header-top-to-text-space, var(--spectrum-accordion-item-header-top-to-text-space)) + var(--mod-accordion-item-header-bottom-to-text-space, var(--spectrum-accordion-item-header-bottom-to-text-space)) + var(--mod-accordion-item-header-font-size, var(--spectrum-accordion-item-header-font-size)) * var(--mod-accordion-item-header-line-height, var(--spectrum-accordion-item-header-line-height)))
    );
}

:host:dir(rtl),
:host([dir="rtl"]) {
    --spectrum-logical-rotation: matrix(-1, 0, 0, 1, 0, 0);
}

:host:lang(ja),
:host:lang(ko),
:host:lang(zh) {
    --spectrum-accordion-item-header-line-height: var(--spectrum-cjk-line-height-100);
    --spectrum-accordion-item-content-line-height: var(--spectrum-cjk-line-height-100);
}

:host([density="compact"]) {
    --spectrum-accordion-item-height: var(--spectrum-component-height-100);
    --spectrum-accordion-item-header-top-to-text-space: var(--spectrum-accordion-top-to-text-compact-medium);
    --spectrum-accordion-item-header-bottom-to-text-space: var(--spectrum-accordion-bottom-to-text-compact-medium);
}

:host([density="compact"][size="s"]) {
    --spectrum-accordion-item-height: var(--spectrum-component-height-75);
    --spectrum-accordion-item-header-top-to-text-space: var(--spectrum-accordion-top-to-text-compact-small);
    --spectrum-accordion-item-header-bottom-to-text-space: var(--spectrum-accordion-bottom-to-text-compact-small);
}

:host([density="compact"][size="l"]) {
    --spectrum-accordion-item-height: var(--spectrum-component-height-200);
    --spectrum-accordion-item-header-top-to-text-space: var(--spectrum-accordion-top-to-text-compact-large);
    --spectrum-accordion-item-header-bottom-to-text-space: var(--spectrum-accordion-bottom-to-text-compact-large);
}

:host([density="compact"][size="xl"]) {
    --spectrum-accordion-item-height: var(--spectrum-component-height-300);
    --spectrum-accordion-item-header-top-to-text-space: var(--spectrum-accordion-top-to-text-compact-extra-large);
    --spectrum-accordion-item-header-bottom-to-text-space: var(--spectrum-accordion-bottom-to-text-compact-extra-large);
}

:host([density="spacious"]) {
    --spectrum-accordion-item-header-line-height: 1.278;
    --spectrum-accordion-item-header-top-to-text-space: var(--spectrum-accordion-top-to-text-spacious-medium);
    --spectrum-accordion-item-header-bottom-to-text-space: var(--spectrum-accordion-bottom-to-text-spacious-medium);
}

:host([density="spacious"][size="s"]) {
    --spectrum-accordion-item-header-line-height: 1.25;
    --spectrum-accordion-item-header-top-to-text-space: var(--spectrum-accordion-small-top-to-text-spacious);
    --spectrum-accordion-item-header-bottom-to-text-space: var(--spectrum-accordion-bottom-to-text-spacious-small);
}

:host([density="spacious"][size="l"]) {
    --spectrum-accordion-item-header-line-height: 1.273;
    --spectrum-accordion-item-header-top-to-text-space: var(--spectrum-accordion-top-to-text-spacious-large);
    --spectrum-accordion-item-header-bottom-to-text-space: var(--spectrum-accordion-bottom-to-text-spacious-large);
}

:host([density="spacious"][size="xl"]) {
    --spectrum-accordion-item-header-line-height: 1.25;
    --spectrum-accordion-item-header-top-to-text-space: var(--spectrum-accordion-top-to-text-spacious-extra-large);
    --spectrum-accordion-item-header-bottom-to-text-space: var(--spectrum-accordion-bottom-to-text-spacious-extra-large);
}

:host([size="s"]) {
    --spectrum-accordion-item-height: var(--spectrum-component-height-100);
    --spectrum-accordion-disclosure-indicator-height: var(--spectrum-component-height-75);
    --spectrum-accordion-component-edge-to-text: var(--spectrum-component-edge-to-text-50);
    --spectrum-accordion-item-header-font-size: var(--spectrum-font-size-200);
    --spectrum-accordion-item-content-font-size: var(--spectrum-body-size-xs);
    --spectrum-accordion-item-header-top-to-text-space: var(--spectrum-accordion-top-to-text-regular-small);
    --spectrum-accordion-item-header-bottom-to-text-space: var(--spectrum-accordion-bottom-to-text-regular-small);
}

:host([size="l"]) {
    --spectrum-accordion-item-height: var(--spectrum-component-height-300);
    --spectrum-accordion-disclosure-indicator-height: var(--spectrum-component-height-200);
    --spectrum-accordion-component-edge-to-text: var(--spectrum-component-edge-to-text-100);
    --spectrum-accordion-item-header-font-size: var(--spectrum-font-size-500);
    --spectrum-accordion-item-content-font-size: var(--spectrum-body-size-m);
    --spectrum-accordion-item-header-top-to-text-space: var(--spectrum-accordion-top-to-text-regular-large);
    --spectrum-accordion-item-header-bottom-to-text-space: var(--spectrum-accordion-bottom-to-text-regular-large);
}

:host([size="xl"]) {
    --spectrum-accordion-item-height: var(--spectrum-component-height-400);
    --spectrum-accordion-disclosure-indicator-height: var(--spectrum-component-height-300);
    --spectrum-accordion-component-edge-to-text: var(--spectrum-component-edge-to-text-200);
    --spectrum-accordion-item-header-font-size: var(--spectrum-font-size-700);
    --spectrum-accordion-item-content-font-size: var(--spectrum-body-size-l);
    --spectrum-accordion-item-header-top-to-text-space: var(--spectrum-accordion-top-to-text-regular-extra-large);
    --spectrum-accordion-item-header-bottom-to-text-space: var(--spectrum-accordion-bottom-to-text-regular-extra-large);
}

:host {
    margin: 0;
    padding: 0;
    list-style: none;
    display: block;
}
